<style>
.fui-goods-item .image .playbtn {
    position: absolute;
	height:auto;
    right: 0.3rem;
    bottom: 0.05rem;
    z-index: 9;
    text-align: center;
    color: #fff;
}
.fui-goods-item {
	padding:0.2rem 0.5rem;
    border-bottom: 0 solid #e7e7e7;
}
.video-group .fui-cell .fui-cell-label:before{
	content: '';
    position: absolute;
    width:0.2rem;
    height:0.6rem;
    background:red;
    left:0;
	top:-0.33rem;
}
</style>
<div ng-if="pagedata.list" class="fui-cell-group fui-cell-click mod-group">
		<div class="fui-cell">
				<div class="fui-cell-label" style="width:4rem">
					<div class="text bold">公众号名称</div>
				</div>
				<div class="fui-cell-info" style="padding-left:0.5rem">
					<div class="text">商家名</div>
				</div>
				<div class="fui-cell-info">
					<div class="text">微信号</div>
				</div>
				<div class="fui-cell-info">
					<div class="text">金币数</div>
				</div>
				<div class="fui-cell-remark noremark">
					<div class="text c" style="color: #888;">发表</div>
				</div>
		</div>
		<div ng-repeat="(key,item) in pagedata.list">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:4rem">
						<div class="text bold" style="color:#5cb85c">{{item.title}}</div>
					</div>
					<div ng-if="item.canlook==1" class="fui-cell-info c" style="font-size:0.5rem">
					{{item.merchname}}
					</div>
					<div ng-if="item.canlook==1" class="fui-cell-info c" style="font-size:0.5rem">
					{{item.wechat}}
					</div>
					<div ng-if="item.canlook!=1" class="fui-cell-info c" style="font-size:0.5rem;width:auto">
						<div href="javascript:" ng-click="pagedata.kango(item.id,key,$index);" class="jylabel jylabel-success" style="color:red;border: 1px solid red;padding:0.15rem 0.3rem;border-radius:1rem;font-weight:400">付金币或付费查看</div>
					</div>
					<div ng-if="item.canlook==1" class="fui-cell-info c" style="font-size:0.5rem">
					{{item.merchmember.credit3||0}}
					</div>
					<div class="fui-cell-remark noremark">
						<div ng-if="item.lastadnum>0" href="javascript:" ng-click="pagedata.nowitem=item;pagedata.showtype=true;" class="jylabel jylabel-success" style="color:red;border: 1px solid red;padding:0.15rem 0.3rem;border-radius:1rem;font-weight:400">发布</div>
						<div ng-if="item.lastadnum<=0" class="jylabel jylabel-default" style="padding:0.15rem 0.3rem;border-radius:1rem;font-weight:400;font-size:0.5rem">名额不足</div>
						<div class="syscolor" style="font-size:0.5rem">{{item.lastadnum||0}}次名额</div>
					</div>
				</div>
				<div id="containerId"></div>
		</div>
		<div class='content-empty' ng-show="!pagedata.list || pagedata.list.length<=0" style="margin:1rem;">
			<i class='icon icon-chakanpingjia' style="font-size:1.5rem"></i><br/>暂时没有公众号列表!
		</div>
</div>
<div class="popup" ng-if="pagedata.showinfo">
	<div class="popup-body">
		<div class="popup-center" style="padding:1rem;">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showinfo=false"></i>
			<div class="weui_btn weui_btn_primary" ng-click="pagedata.totype1()">付金币商家信息({{pagedata.pluginset.kan_bfee || 0}}个)</div>
			<div class="weui_btn weui_btn_primary" ng-click="pagedata.totype3()">付费看商家信息(￥{{pagedata.pluginset.kan_price ||'0.00'}})</div>
			<div class="weui_btn weui_btn_primary" ng-click="pagedata.showad=true">看广告赚金币</div>
		</div>
	</div>
</div>
<div class="popup" ng-if="pagedata.showtype">
	<div class="popup-body">
		<div class="popup-center" style="padding:1rem;">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showtype=false"></i>
			<div class="weui_btn weui_btn_primary" ng-click="pagedata.toupnews(pagedata.nowitem.id,0)">发文通过，奖励金币({{pagedata.nowitem.jinbi || 0}}个)</div>
			<div ng-if="pagedata.nowitem.price>0" class="weui_btn weui_btn_primary" ng-click="pagedata.toupnews(pagedata.nowitem.id,1)">发文通过，奖励佣金(￥{{pagedata.nowitem.price ||'0.00'}})</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('_kan')"></div>
<script>
scope.tool.get_list('jy_wechatnews/index/getlist/isall=1',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_wechatnews/index/getlist/isall=1');
}
scope.pagedata.toupnews=function(listid,type){
	listid =listid?listid:scope.pagedata.listid
	scope.post({},'/index/toupnews/listid='+listid+'&feetype='+type)
}
scope.pagedata.totype1=function(listid){
	listid =listid?listid:scope.pagedata.listid
	scope.confirm({
			'message':'确认要花'+scope.pagedata.pluginset.kan_bfee+'个金币看商家信息吗？',
			'success':function(){
				scope.post({},'/index/fub/listid='+listid)
			},
			'fail':function(){}
	});
}
scope.pagedata.totype3=function(listid){
	listid =listid?listid:scope.pagedata.listid
	scope.post_json('/list/pay/',{'listid':listid},function(result){
				scope.pagedata.order_id=result.order_id;
				var success_url='reload';
				scope.$evalAsync();
				scope.tool.pay(result.pay_id,function(res){
						if(res.type=='success'){
							scope.message('支付成功！','success',success_url);
						}else{
							scope.message('支付失败！','success',error_url);
						}
				},'','',success_url);
	});
}
scope.pagedata.kango=function(listid,index,goodsindex){
	scope.pagedata.listid=listid;
	scope.pagedata.listindex=index;
	scope.pagedata.goodsindex=goodsindex;
   if(scope.pagedata.pluginset.kan_type==1){
		scope.pagedata.totype1(listid);
   }else if(scope.pagedata.pluginset.kan_type==2){
		scope.pagedata.showad=true;
		scope.$evalAsync();
   }else if(scope.pagedata.pluginset.kan_type==3){
		scope.pagedata.totype3(listid);
   }else if(scope.pagedata.pluginset.kan_type==4){
		scope.pagedata.showinfo=true;
		scope.$evalAsync();
   }else{
		scope.message('免费查看！','error');
   }
}
//获取收藏
scope.pagedata.setlike=function(listid){
	scope.post_json('jy_wechatnews/index/setlike/id='+listid,{},function(res){
		scope.message(res)
	});
}
</script>